<div class="container">
      <div class="row">
        <div class="col-md-12">
          <div class="panel panel-visible">
            <div class="panel-heading">
              <div class="panel-title hidden-xs"> <img src="<?php echo $baseurl.'public/theme/default/img/list.png'?>" alt="user avatar" width="28" height="28" /> Danh sách quản lý giờ nghỉ thuyền viên</div>
              
              <div style="float: right;"><button onclick="window.location='<?php echo $baseurl.'add-rest-time.html'?>'" type="button" class="btn btn-info btn-gradient btn-sm">Thêm giờ nghỉ</button></div>
            </div>

            <div class="panel-body padding-bottom-none">
            
                <form name="frm_filter" id="frm_filter" method="POST" action="">
                    <div class="panel-export">
                        <label style="float:  left;width: 10%">Chọn nhân viên</label>
                        <div style="float:  left;width: auto;margin-right: 30px">
                            <select style="padding: 3px" id="crew-list" name="crew-list">
                                <?php echo $listcrew;?>
                            </select>
                        </div>
                        <div style="float:  left;width: 90px;font-size: 13px; font-weight:bold;">Thời gian từ </div>
                        <div style="float: left; margin-right: 30px;">
                              <input type="text" class="" id="start-date-search" name="start-date-search" value="<?php echo $start_date_search;?>">
                        </div> 
                        
                        <div style="float:  left;width: 50px;font-size: 13px; font-weight: bold;">Đến </div>
                        <div style="float: left; margin-right: 30px;">
                              <input type="text" class="" id="end-date-search" name="end-date-search" value="<?php echo $end_date_search;?>">
                        </div> 
                        
                        <button id="btn_filter" name="btn_filter" type="submit">Xem</button>
                        
                        
                    </div>
                </form>
            
              <table class="table table-striped table-bordered table-hover" id="datatable">
                <thead>
                  <tr style="background: #CCC;color: #FFF">
                    <th style="width: 5%">No</th>
                    <th style="width: 20%">Full Name</th>
                    <th style="width: 10%">Rank</th>
                    <th style="width: 15%">Rest Date</th>
                    <th style="width: 10%">Rest Time</th>
                    <th style="width: 10%">Sum Rest Time</th>
                    <th style="width: 20%">Ngoại lệ</th>
                    <th style="width: 10%" class="text-center">Action</th>
                  </tr>
                </thead>
                <tbody>
                <?php $i = 1; foreach($data AS $el=>$le):?>
                  <tr>
                    <td><center><?php echo $page == 0 ? $i : ($page++) + 1;?></center></td>
                    <td><span class="xedit"><?php echo $le->fullname ?></td>
                    <td><?php echo $le->rank ?></td>
                    <td><?php echo date("d-m-Y", strtotime($le->rest_day)); ?></td>
                    <td><?php echo $le->rest_time_from .'h -> '.$le->rest_time_to.'h' ?></td>
                    <td><?php echo $le->sum_rest_time ?></td>
                    <td><?php if($le->type == 1 ) echo("Nghỉ thường nhật"); else{ echo ("Tập trung, thực tập cứu sinh");} ?></td>
                    
                    <td class="text-center"><div class="btn-group">
                        <span class="ico-edit"><img src="<?php echo $baseurl.'public/theme/default/img/edit.png'?>" alt="user avatar" width="18" height="18" title="Sửa" onclick="editRestTime('<?php echo $le->id ?>', '<?php echo $pageCurrent ?>');" /></span>
                        <span class="ico-delete"><img src="<?php echo $baseurl.'public/theme/default/img/erase.png'?>" alt="user avatar" width="18" height="18" title="Xóa" onclick="deleteRestTime('<?php echo $le->id ?>');" /></span>
                    </td>
                  </tr>
                <?php $i++; endforeach;?>
                </tbody>
              </table>
              <div class="pagination">
                <?php echo $this->pagination->create_links();?> 
            </div>
            </div>
          </div>
        </div>
      </div>
    </div>